package com.jungle.bfi.generator.mo;

import lombok.Getter;
import lombok.Setter;

import java.nio.file.Path;

@Setter
@Getter
public class PathInfo {
    /**
     * projectDir<br>
     * eg: D:\\workspace.gee\\jungleknife
     */
    private Path projectDir;
    /**
     * module<br>
     * eg: domain
     */
    private String projectModule;
    /**
     * baseDir<br>
     * eg: src/main/java
     */
    private String baseDir;
    /**
     * packageName<br>
     * eg: com.jungle.bfi.code
     */
    private String packageName;
    /**
     * fileName<br>
     * eg: EntryTemplateBo
     */
    private String model;
    /**
     * extension<br>
     * eg: .java
     */
    private String extension;

    public Path getClassPath() {
        return projectDir.resolve(projectModule).resolve(baseDir).resolve(packageName.replace(".", "/"));
    }
    public Path getJavaPath() {
        return getClassPath().resolve(model.concat(extension));
    }
}
